home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / print / gs261ini.zip / PS2EPSI.BAT < prev    next >
DOS Batch File  |  1993-03-06  |  681b  |  26 lines

  1. @echo off 
  2. if "%1"=="" goto usage
  3. if "%2"=="" goto usage
  4.  
  5. set infile=%1
  6. set outfile=%2
  7.  
  8. rem Ghostscript uses %outfile% to define the output file
  9. gs -q -dNOPAUSE -dNODISPLAY ps2epsi.ps < %infile%
  10.  
  11. rem We bracket the actual file with a few commands to help encapsulation
  12. echo /InitDictCount countdictstack def gsave save mark newpath >> %outfile%
  13.  
  14. rem Append the original onto the preview header
  15. copy %outfile% + %infile%
  16.  
  17. echo countdictstack InitDictCount sub { end } repeat >> %outfile%
  18. echo cleartomark restore grestore >> %outfile%
  19.  
  20. goto end
  21.  
  22. :usage
  23. echo "Usage: ps2epsi <infile.ps> <outfile.epi>"
  24.  
  25. :end
  26.